--[[ 1 ]] local white = require "prefabs/rg_weapons_white"
--[[ 2 ]] local blue  = require "prefabs/rg_weapons_blue"
--[[ 3 ]] local purple = {}
--[[ 4 ]] local orange = {}

local initfn = require "rg_datainit"

local all = {}

for i,v in ipairs{ white, blue, purple, orange }do
	for k, v in pairs(v) do
		assert(all[k] == nil, "Key exists: "..k)
		all[k] = v

		initfn(k, v, {isweapon = true})

		v.rarity = i
		v.key = k
		v.prefab = "rg_"..v.key

		v.build = v.build or v.prefab
		v.bank = v.bank or v.build
		v.anim = v.anim or "idle"
		v.anim_float = v.anim_float or v.anim
		v.sound = v.sound == true
		v.build_onhand = v.build_onhand or self.build
		v.symbol = v.symbol or v.build_onhand

		if type(v.symbol) == "string" then
			v.symbol = {
				{"swap_object", v.symbol}
			}
		end
	end
end

return {
	white = white,
	blue = blue,
	purple = purple,
	orange = orange,
	all = all,
}